// 子系统组件
class Amplifier {
    void on() {
        System.out.println("Amplifier is on");
    }

    void off() {
        System.out.println("Amplifier is off");
    }
}

class Projector {
    void on() {
        System.out.println("Projector is on");
    }

    void off() {
        System.out.println("Projector is off");
    }
}

class LightController {
    void dim(int level) {
        System.out.println("Lights are dimmed to level " + level);
    }

    void brighten(int level) {
        System.out.println("Lights are brightened to level " + level);
    }
}

// 外观
class HomeTheaterFacade {
    private Amplifier amplifier;
    private Projector projector;
    private LightController lightController;

    public HomeTheaterFacade(Amplifier amp, Projector proj, LightController light) {
        this.amplifier = amp;
        this.projector = proj;
        this.lightController = light;
    }

    public void watchMovie() {
        System.out.println("Get ready to watch a movie...");
        amplifier.on();
        projector.on();
        lightController.dim(5);
        // 更多设置...
    }

    public void endMovie() {
        System.out.println("Shutting down the movie theater...");
        amplifier.off();
        projector.off();
        lightController.brighten(10);
        // 更多清理...
    }
}

// 客户端
public class Main {
    public static void main(String[] args) {
        Amplifier amp = new Amplifier();
        Projector proj = new Projector();
        LightController light = new LightController();

        HomeTheaterFacade homeTheater = new HomeTheaterFacade(amp, proj, light);

        // 打开家庭影院观影
        homeTheater.watchMovie();

        // 关闭家庭影院
        homeTheater.endMovie();
    }
}
